/**
 * @FileName Context.java
 * @Package com.designMode.strategy
 * -------------------------------------
 * @function Please write description of function
 * @Date 2016-1-6 下午4:11:53
 * -------------------------------------
 * Copyright (c) 2016,顾博君 All Rights Reserved.
 */
package com.designMode.strategy;

/**
 * @author 顾博君
 * @ClassName Context
 * @Date 2016-1-6 下午4:11:53
 * @Function 上下文对象
 */
public class Context {
    /**
     * 策略
     */
    private Strategy strategy = null;

    /**
     * 设置具体策略
     *
     * @param strategy 策略
     */
    public void setStrategy(Strategy strategy) {
        this.strategy = strategy;
    }

    /**
     * 封装后的策略方法
     */
    public void doSomething() {
        this.strategy.doSomething();
    }
}
